<template>
  <div class="home">
    <van-empty style="padding: 0.01rem 0" description=""> </van-empty>

    <div
      class="bb"
      :style="{
        background:
          'url(' + baseImg + ') no-repeat 100%/100% rgba(0, 0, 0, 0.1)',
      }"
    >
      <!-- <img style="width: 10rem;
    height: 10rem;
    margin-left: 4.5rem;
    margin-right: 5rem;" class="diagramTop-item-click" :src="baseImg" alt="" /> -->

      <!-- <van-image
      class="diagramTop-item-click"
        width="10rem"
        height="10rem"
        style="padding-left: 5rem;
    padding-right: 5rem;"
        fit="cover"
        position="left"
        :src="baseImg"
      /> -->

      <!-- <img src="../../assets/images/success.jpg" /> -->
    </div>
    <div style="padding-left: 33%; padding-right: 33%">
      <!-- <van-image
        width="10rem"
        height="10rem"
        fit="cover"
        position="left"
        :src="baseImg"
      /> -->

      <p style="text-align: center">填报成功！</p>
    </div>
    <div style="padding-left: 12%; padding-right: 12%; margin-top: 19rem">
      <!-- <van-image
        width="10rem"
        height="10rem"
        fit="cover"
        position="left"
        :src="baseImg"
      /> -->
      <p style="text-align: center">请将此页面截图，以备查验！</p>
    </div>
    <div style="margin: 16px; display: flex">
      <!-- <van-button block type="info" @click="goToRest()">添加随行人</van-button> -->
    </div>
  </div>
</template>

<script>
import area from '@/libs/area.json'
import { helpUserNewQrCode } from '@/api/self/help'
import { Toast, Dialog } from 'vant'
export default {
  data () {
    return {
      baseImg: ''
    }
  },
  mounted () {
    let url =
      'https://dalianoutbreaknew.lngov.top/railway/#/record-info?id=' +
      this.$route.query.id
    console.log('url=====,===', url)
    helpUserNewQrCode({ param: url }).then((res) => {
      Toast.clear()
      if (res.data.errcode === 0) {
        this.baseImg = res.data.data
        console.log(this.baseImg)
      } else {
        Toast.fail(res.data.msg)
      }
    })
  },
  methods: {
    goToRest () {
      this.$router.push({
        name: 'record',
        query: { id: this.$route.query.id, code: this.$route.query.code }
      })
    }
  }
}
</script>
<style lang="less" scoped>
.bb,
.bb::before,
.bb::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.bb {
  width: 450px;
  height: 450px;
  margin: auto;
  /* background: url(baseImg) no-repeat 50%/70% rgba(0, 0, 0, 0.1); */
  color: #69ca62;
  // box-shadow: inset 0 0 0 1px rgba(105, 202, 98, 0.5);
}
.bb::before,
.bb::after {
  content: '';
  z-index: -1;
  margin: -5%;
  box-shadow: inset 0 0 0 2px;
  animation: clipMe 8s linear infinite;
}
.bb::before {
  animation-delay: -4s;
}
.bb:hover::after,
.bb:hover::before {
  background-color: rgba(255, 0, 0, 0.3);
}

@keyframes clipMe {
  0%,
  100% {
    clip: rect(0px, 520px, 2px, 0px);
  }
  25% {
    clip: rect(0px, 2px, 520px, 0px);
  }
  50% {
    clip: rect(518px, 520px, 520px, 0px);
  }
  75% {
    clip: rect(0px, 5100px, 520px, 500px);
  }
}
</style>
<style lang="less" scoped>
.upload-img-5 {
  margin: 5px 0 90px 0;
}
.upload-img-1 {
  margin: 5px 0 15px 0;
}
.home {
  //   background: url('../../assets/images/smtb.jpg')no-repeat;

  img {
    width: 100%;
  }
  .dialog-container {
    height: 70vh;
    overflow-y: auto;
  }
  .get-area {
    width: 100%;
    padding: 0 0.8rem;
    font-size: 0.747rem;
    color: #fff;
    background-color: #1989fa;
    border: 0.053rem solid #1989fa;
    height: 2.347rem;
    line-height: 2.347rem;
    text-align: center;
    border-radius: 0.107rem;
    cursor: pointer;
    box-sizing: border-box;
    margin-right: 10px;
  }
  /deep/.van-field__label {
    width: 8em;
  }
  /deep/.van-field__error-message {
    text-align: right;
  }
  .title {
    // font-size: 28px;
    text-indent: 20px;
    padding: 50px 0 20px;
  }
  .container {
    width: 90%;
    height: 80vh;
    overflow-y: auto;
    border: 1px solid #adadad;
    margin: auto;
    .item {
      margin: 10px;
    }
  }
}
.up-and-down {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1f3f4;
  height: 80px;
  color: #333;
}
// .home .blue {
//   background-color: transparent;
// }
// .home .van-cell{
//  background-color: transparent;
// }
</style>
